home *** CD-ROM | disk | FTP | other *** search
- #include <math.h>
- #include "viscosity.h"
- #include "matrix.hxx"
- #include "Cheb_vector.hxx"
- #include "vimatrix.hxx"
- #include "ocean.hxx"
- #include "ocpanel.hxx"
- extern void update_ocean_glue(char * ocean_panel_handle,
- double * data, int size );
- extern void test(char * ocean_panel_handle);
- /*
- -*++ ocpanel::ocpanel(): constructor
- **
- ** (*++ history:
- ** 16 Jan 88 Bruce Eckel Creation date
- ** ++*)
- **
- ** (*++ detailed:
- ** ++*)
- */
-
- ocpanel::ocpanel(ocean_layer & ocean) {
- ocean_panel_handle =
- ocean_panel_constructor(ocean.lambda(), ocean.xldomain(),
- ocean.xrdomain(), ocean.viscosity_value(),
- ocean.viscosity_type(), ocean.nmodes());
- screen_update_rate = 1;
- }
- /* constructor is messy -- leaves stuff lying about */
-
-
- /*
- -*++ ocpanel::display(): displays ocean data via sunview
- **
- ** (*++ history:
- ** 12 Jan 88 Bruce Eckel Creation date
- ** ++*)
- **
- ** (*++ detailed:
- ** ++*)
- */
-
- void ocpanel::display(phys_vector & DispVec)
- {
- static int count = 0;
- // cout << "count = " << count << "\n";
- // cout << "display_rate " << display_rate() << "\n";
- // cout << "ocean_panel_handle " << (long)ocean_panel_handle << "\n";;
- // cout << "size = " << DispVec.size() << "\n";
- // for (int i = 0; i < DispVec.size(); i ++ )
- // cout << DispVec.doublvect()[i] << " ";
- // cout.flush();
- if (++count == display_rate()) {
- count = 0;
- update_ocean_glue(ocean_panel_handle, DispVec.doublvect(),
- DispVec.size());
- // test(ocean_panel_handle);
- }
- }
-